package com.atguigu.gmall.web.filter;

import javax.servlet.*;
import javax.servlet.http.HttpFilter;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class HelloFilter implements Filter {
    @Override
    public void doFilter(ServletRequest request,
                         ServletResponse response,
                         FilterChain chain) throws IOException, ServletException {
        //目标请求处理以前

        //请求放行
        chain.doFilter(request,response);


        HttpServletResponse resp = (HttpServletResponse) response;
//
        resp.sendRedirect("");

        //目标请求处理完成以后
    }
}
